import React from 'react';
import { Form, Input, Button } from 'antd';

const EditUser = () => {
  const handleSubmit = (values) => {
    // 提交表单数据，执行编辑操作
    console.log('编辑用户，表单数据为：', values);
  };

  return (
    <div>
      <h2>编辑用户</h2>
      <Form onFinish={handleSubmit}>
        <Form.Item label="姓名" name="name" rules={[{ required: true, message: '请输入姓名' }]}>
          <Input />
        </Form.Item>
        <Form.Item label="年龄" name="age" rules={[{ required: true, message: '请输入年龄' }]}>
          <Input />
        </Form.Item>
        <Form.Item label="性别" name="gender" rules={[{ required: true, message: '请选择性别' }]}>
          <Input />
        </Form.Item>
        <Form.Item>
          <Button type="primary" htmlType="submit">保存</Button>
        </Form.Item>
      </Form>
    </div>
  );
};

export default EditUser;
